//index.js
//获取应用实例
const app = getApp()
Page({
  /**
   * 页面的初始数据
   */
  data: {
    submitColor:'',
    num:1
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var rad = (Math.random() *10 + 1)%2+1;
    var intRad = parseInt(rad);
    this.setData({num:intRad});
  },

  /**
   * 选择答案
   */
  submitQuestion:function()
  {
    this.setData({ submitColor: 'green' });
    wx.redirectTo({
      url: '/pages/tuya/tuya'
    })
  }
})